home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 46
/
Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso
/
-serious-
/
programming
/
other
/
cop
/
terminal.doc
< prev
next >
Wrap
Text File
|
1999-09-06
|
14KB
|
296 lines
$VER: Terminal documation 3.5
*****************************************************************************
** **
** ___________ **
** \ */ **
** /----------- ####### ####### ######## **
** | ^ | ## ## ## ## ## ## **
** | _\ ## ## ## ## ## Version 1.68 **
** | | ## ## ## ######## **
** | --| ## ## ## ## **
** +-----/ ## ## ## ## ## **
** | | ####### ####### ## (c)1993-98 THOR-Software **
** **
** A Low Level Debugger for all Amiga Systems **
**-------------------------------------------------------------------------**
** __ **
** ___/| **
** / |:| Type 3 Terminal (COP/DASB) Specifiactions **
** ====== | |:| Type 4 Terminal (COP/DASB 4.2) **
** ====== | |:| Type 5 Terminal (COP) **
** ====== | |:| (c) 1994-1998 THOR-Software **
** \__|/ **
** **
** Release 3.3 14th May 1994 **
** Release 3.4 29th May 1994 - added type 4 terminals **
** Release 3.5 31th May 1995 - added type 5 terminals **
*****************************************************************************
This documentations describes the character and control codes used by the
COP System debugger, copyrighted by THOR.
Terminology
-----------
Orientation of a "COP SCREEN"
first column last column
| |
+-------------------------------------------+ <- top line
| |
| |
| | <- top window
| | (this one is fixed and
| | does not scroll)
+-------------------------------------------+
| |
|*******************************************| <- marked line (type 4
| | terminals text
| | blinking or high
| | intensity)
| |
| | <- bottom window
| # (cursor) | (scrollable)
| |
| |
+-------------------------------------------+ <- bottom line
^
Screen | (the whole thing)
Lines are counted from top bottom with the top line beeing number 0.
Columns are counted from left to right with the first column being 0.
Screen Specifications
---------------------
columns: 80 (fixed)
rows: between 24 and 64
Line marking (Type 4 terminals only)
------------
The characters in a given line share a common attribute, selectable by
an escape sequence (see below). The following attributes are defined and
will be send by the highlight escape sequence :
00: Normal (as for type 3 and ascii terminals)
01: Highlight or white background
02: Blink or red background
03: undefined, terminal specific and not used by COP
Notes:
i) It is not possible to mark SINGLE characters, only whole lines.
Character marking might be included in a later release.
ii) Line marking is not compatible with scrolling. Disable the
marks first, if you want to scroll.
Some terminals scroll the marks together with the characters,
others won't.
Serial Transfer Specifications (if any)
---------------------------------------
baud rate: 9600
start bits: 1
stop bits: 1
parity: none
Character Map
-------------
i)control characters (in HEX)
00 : NUL ignore
08 : BS non-erasing backspace
do nothing at start of line
09 : TAB Jump to next tab stop
tab stops are set every eigth
columns. Jump to next line and
scroll if beyond last tab stop.
0A : LF Move cursor down one line. Scroll
if end of display reached. Perform
NO CR, don't set cursor to start of
line. (No auto CR)
The effect of scrolling marked
lines is undefined.
0C : FF Clear screen. Move cursor to top of
screen. Set window size to zero
(=disable splitting).
On type 4 terminals : clear all line
marks.
0D : CR Set cursor to start of line. Perform
NO LF, do not scroll, move cursor
NOT downwards. (No auto LF)
1B : ESC introduce ESC-sequence (see below)
1C : UP move cursor upwards one line. If top
of screen reached, move to
bottommost line, do no reverse scroll
1D : DOWN Move cursor downwards one line. If
bottom reached, jump to first line,
do not scroll.
1E : LEFT move cursor one character to the
left, if first column passed, move
to last column of the same line
(do not move cursor upwards)
1F : RIGHT move cursor one character to the
right, if last column passed, move
to first column of the same line
(do not move cursor downwards)
20-7E : standard american ASCII.
7F : DEL Reserved, not used by COP.
You should not use this character.
9B : EOL Move cursor down one row, then move
it to the first column (=LF & CR)
Note: The term "scrolling" is used as "scrolling the scrollable bottom
window", the top window (if any) is never scrolled.
All other codes are ignored, especially no 8-bit ASCII-codes are supported
and interpretation of this codes are terminal-dependent. (National languague
characters as defined by ISO, IBM or MAC characters or inverse characters).
They are not used by COP.
ESC-Sequences
-------------
All arguments to ESC-sequences are 7 bit binary numbers. I decided not to
use decimal numbers to keep the thing simple and fast....
The answer values of an external terminal, if any, is also a 7 bit number
and is noted here by "->":
1B 01 : Send ID
-> id The terminal should send within 1/2 sec.
its version number as binary code.
All terminals with codes >=3 are
believed to support type 3 terminal
codes. If the terminal does not repond
in this period, COP assumes this being
an ASCII terminal.
All terminals >=4 support type 4 codes.
If this is a type 5 terminal, it should
disable the printer output, similar to
the disable command described below.
1B 02 xx yy : Set cursor to column xx, line yy, the
first column/line is number 0.
xx and yy are transmitted as binary
codes, NOT AS DECIMALS.
1B 03 yy : Draw horizontal line at line yy, set
cursor to line yy,column 0. The drawing
should be done by inverting the screen,
so drawing the line again undoes it.
1B 04 : Draw horizontal line at current cursor
position, reset cursor to column 0.
1B 05 yy : Set the size of the top window in
lines, no top window if yy=0.
With the top window activated, scolling
takes place only in the bottom window,
starting with line yy to the bottom line.
No graphics are printed to make the window
visible, use the draw line command in the
top window to do this.
1B 06 : Send cursor position. The terminal must
-> xx yy repond with two binary numbers beeing
the column number/line number of the
current cursor position resp.
The first column/line is number 0.
1B 07 y1 y2 : Clear region. The lines from y1 inclusive
and y2 exclusive are cleared. The cursor
position is not affected.
(Don't forget to redraw the cursor !)
1B 08 : Clear this line. The line at current cursor
position is cleared, the cursor is not
affected.
(Don't forget to redraw the cursor !)
1B 09 : Scroll bottom window, do not affect cursor.
The window should be scrolled under the
cursor, so the cursor position won't
change in respect to the upper left edge
of the screen, but will change in respect
to the text scrolled under the cursor.
The effect of scrolling marked lines
is undefined and COP does not send codes
to do so.
1B 0A : Send screen size. The terminal must respond
-> yy with the size of the active display in
lines, coded as a binary number.
The following sequences are defined for type 4 terminals only and won't
be send to type 3 terminals:
1B 0B yy cc : Mark line yy with color cc. Colorcodes
00 : normal background
01 : white background or
high intensity
02 : red background or
blinking mode
03 : terminal specific
(not sent by COP)
1B 0C cc : Mark cursor line with color cc.
1B 0D : Remove all marks.
1B 0E : Clear until end of line
the cursor position won't change by this
command
...and now the type 5 terminal sequences (won't be sent to types 3 and 4):
1B 10 : Start printer output
All data send to the terminal should be
printed to a local printing device,
except ESC-sequences
1B 11 : Stop printer output
Display data only on the screen
Both calls should not nest, this is done
by COP
Implementations
---------------
Currently only two terminal programs support COP control sequences. The
first is the "Terminal" program found in the COP archive, for amiga computers.
If you own a second amiga, run this program and use a null modem cable for
connection (GND,TxD and RxD crossed is enough for COP).
The second program is "DASB" for the antique Atari 8 bit series. It requires
an 850 or 850XL interface box and a disk drive. It is also available in the
COP archive, in the drawer "DASB_German".
It would be nice if somebody could write more COP terminals for other
computers. Contact me in this case, the programs will be included in the
COP archive next time.
Thomas